//
//  FinishChangeView.m
//  hnGovernment
//
//  Created by 安仔 on 17/3/6.
//  Copyright © 2017年 安仔. All rights reserved.
//

#import "FinishChangeView.h"

@implementation FinishChangeView

- (instancetype) initWithFrame:(CGRect)frame {

    self = [super initWithFrame:frame];
    if (self) {
        [self createFinishChangeView];
    }
    return self;
}

- (void)createFinishChangeView {

    self.signImg = [[UIImageView alloc] initWithFrame:CGRectMake(326 * m6Scale, 104 * m6Scale, 104 * m6Scale, 104 *m6Scale)];
    self.signImg.image = [UIImage imageNamed:@"正确"];
    [self addSubview:self.signImg];

    
    self.signLab = [[UILabel alloc] initWithFrame:CGRectMake((KScreenWidth - 300 * m6Scale)/2, 226 * m6Scale, 300 * m6Scale, 82 * m6Scale)];
    self.signLab.text = NSLocalString(@"修改成功");
    self.signLab.font = [UIFont systemFontOfSize:56 * m6Scale];
    self.signLab.textAlignment = NSTextAlignmentCenter;
    [self addSubview:self.signLab];
    
    
    self.contentLab = [[UILabel alloc] initWithFrame:CGRectMake(0, 316 * m6Scale, KScreenWidth, 45 * m6Scale)];
    self.contentLab.text = NSLocalString(@"当前新昵称：政务君君");
    self.contentLab.font = [UIFont systemFontOfSize:28 * m6Scale];
    self.contentLab.textAlignment = NSTextAlignmentCenter;
    self.contentLab.textColor = RGB(103, 103, 103);
    [self addSubview:self.contentLab];

    
    self.finishBtn = [[UIButton alloc] initWithFrame:CGRectMake(76 * m6Scale, 436 * m6Scale, 600 * m6Scale, 80 * m6Scale)];
    [self.finishBtn setTitle:NSLocalString(@"确认") forState:0];
    [self.finishBtn setTitleColor:[UIColor whiteColor] forState:0];
    self.finishBtn.backgroundColor = APPColor;
    self.finishBtn.layer.cornerRadius = 10 * m6Scale;
    [self.finishBtn addTarget:self action:@selector(finish) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:self.finishBtn];
    
}

- (void)finish {
    
    if ([self.delegate respondsToSelector:@selector(clickFinishBtn)]) {
        [self.delegate clickFinishBtn];
    }
}

@end
